package de.lusiardi.webdav.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * http://www.webdav.org/specs/rfc4918.html#ELEMENT_locktoken
 *
 * @author Joachim Lusiardi
 */
@XmlRootElement(name = "locktoken")
@XmlAccessorType(XmlAccessType.FIELD)
public class LockToken {
    
    @XmlElement
    private List<Href> href;
    
    public List<Href> getHref() {
        return href;
    }
    
    public void setHref(List<Href> href) {
        this.href = href;
    }
    
    public void addHref(Href href) {
        if (this.href == null) {
            this.href = new ArrayList<Href>();
        }
        this.href.add(href);
    }
}
